<html>
<head><meta charset="utf-8"><title>does i32x4 have a consistent repr? · project-portable-simd · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/index.html">project-portable-simd</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html">does i32x4 have a consistent repr?</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="213621333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213621333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213621333">(Oct 16 2020 at 22:34)</a>:</h4>
<p>So I can't find it right now but I noticed someone say something while I was skimming the Internet for things, saying something like "well, that ARM intrinsic that manipulates an int32x4_t doesn't have a repr equivalent to int32_t[4], it has a repr equivalent to whatever such a thing looks like after being dropped on the stack by the vector instruction." My first response was "well, that's nonsense."</p>
<p>But then I thought about it and I could see... kinda? Where such a concern might come from. So, I... highly doubt this is an actual concern even in C code, or even when manipulating the machine with assembly, but I figured I'd ask, since sometimes the answer is "yes"... does anyone think that dumping an i32x4 on the stack will be inconsistently represented across machines, or that we will have any kind of other issue in this regard?</p>



<a name="213621750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213621750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213621750">(Oct 16 2020 at 22:40)</a>:</h4>
<p>The layout is consistent among a particular architecture, if that's what you mean.  The size is known but the alignment is varying between architectures</p>



<a name="213621777"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213621777" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213621777">(Oct 16 2020 at 22:41)</a>:</h4>
<p>LLVM allows (and even recommends in some cases) using bitcast between vectors and arrays</p>



<a name="213621876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213621876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213621876">(Oct 16 2020 at 22:43)</a>:</h4>
<p>Alright, so bitcasts are fine, and there might be some weird alignment clause that is specifically why repr_simd has that caveat.</p>



<a name="213622014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213622014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213622014">(Oct 16 2020 at 22:45)</a>:</h4>
<p>Yep. It also has implications on calling convention</p>



<a name="213622041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213622041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213622041">(Oct 16 2020 at 22:45)</a>:</h4>
<p>But that's rust specific and I don't know much about that</p>



<a name="213622131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213622131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213622131">(Oct 16 2020 at 22:46)</a>:</h4>
<p>Mhm.<br>
But this does suggest that a naive way to write an SVE-like vector [128bitVector; N] also would have no layout problems, ne? It just needs repr_simd to handle the alignment properly.</p>



<a name="213622268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213622268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213622268">(Oct 16 2020 at 22:49)</a>:</h4>
<p>I'm not sure if you can still bitcast it since it's not a sized type, but yeah I would expect it to otherwise act as though it has a particular layout, you just don't know what the layout is at compile time</p>



<a name="213622303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213622303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213622303">(Oct 16 2020 at 22:49)</a>:</h4>
<p>I definitely think it would be valid to represent it as a slice of arrays</p>



<a name="213622369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213622369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213622369">(Oct 16 2020 at 22:50)</a>:</h4>
<p>(or slice of i32x4s if that makes sense for some reason?)</p>



<a name="213622427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213622427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213622427">(Oct 16 2020 at 22:51)</a>:</h4>
<p>OK, cool. It sounds like we might bump into a few oddities here and there but will be overall fine.</p>



<a name="213622459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213622459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213622459">(Oct 16 2020 at 22:51)</a>:</h4>
<p>Yeah, I actually think an API for scalable vectors probably isn't too bad</p>



<a name="213622538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213622538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213622538">(Oct 16 2020 at 22:52)</a>:</h4>
<p>And I think we're good for fixed size. We're already transmuting them in a few places</p>



<a name="213623081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213623081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213623081">(Oct 16 2020 at 23:01)</a>:</h4>
<p>"SIMD vectors don't have a specific alignment but can be reliably bitcast" probably should go in our guide.</p>



<a name="213623165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213623165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213623165">(Oct 16 2020 at 23:03)</a>:</h4>
<p>Agreed. More specifically they have a specific alignment but it depends on architecture (and maybe target feature?)</p>



<a name="213623177"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213623177" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213623177">(Oct 16 2020 at 23:03)</a>:</h4>
<p>I think just architecture but I'm not positive</p>



<a name="213623190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213623190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213623190">(Oct 16 2020 at 23:03)</a>:</h4>
<p>"SIMD vectors have a non-portable alignment :^)"</p>



<a name="213623379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213623379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Caleb Zulawski <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213623379">(Oct 16 2020 at 23:07)</a>:</h4>
<p>Exactly. I think it's probably perfectly fine to use align_of (I think??)</p>



<a name="213623519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213623519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213623519">(Oct 16 2020 at 23:09)</a>:</h4>
<p>clearly we should totally suggest that and update the guide when someone breaks their code on that. :^)</p>



<a name="213625198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213625198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213625198">(Oct 16 2020 at 23:49)</a>:</h4>
<p>Saying that the layout is always a newtype over an array with potentially-higher alignment makes good sense to me <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="213625262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213625262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213625262">(Oct 16 2020 at 23:50)</a>:</h4>
<p>Could even be <code>AsRef&lt;T&gt;</code>, potentially</p>



<a name="213625273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213625273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213625273">(Oct 16 2020 at 23:51)</a>:</h4>
<p>(And safe-transmute will give it <code>TransmuteInto</code> and <code>TransmuteFrom</code> arrays, presumably.)</p>



<a name="213625655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213625655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213625655">(Oct 16 2020 at 23:59)</a>:</h4>
<p>specifically, intel vectors are generally aligned to <code>size_of::&lt;VectorType&gt;()</code> while ARM vectors are generally aligned to something <em>less than</em> that value.</p>



<a name="213625738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213625738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213625738">(Oct 17 2020 at 00:01)</a>:</h4>
<p>I think that, for consistency, we should make the portable data always have the full align value</p>



<a name="213625752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213625752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213625752">(Oct 17 2020 at 00:01)</a>:</h4>
<p>I don't know if repr(simd) currently allows that or not</p>



<a name="213626465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213626465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213626465">(Oct 17 2020 at 00:18)</a>:</h4>
<p>That may have weird and unnecessary consequences regarding the larger 512 bit or dynamically sized types, so for now we can coast with the parametric alignment.</p>



<a name="213626526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213626526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213626526">(Oct 17 2020 at 00:20)</a>:</h4>
<p>( It does seem desirable tho'. )</p>



<a name="213626534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213626534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213626534">(Oct 17 2020 at 00:20)</a>:</h4>
<p>I think a big advantage of the portable stuff would be that it's safe, so it's not obvious to me that the consistent alignment would be particularly important.</p>



<a name="213626678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213626678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213626678">(Oct 17 2020 at 00:24)</a>:</h4>
<p>I could also imagine that people might use bigger-than-actually-exist vectors, where going all the way to full alignment would be a waste.</p>



<a name="213626746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213626746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jubilee <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213626746">(Oct 17 2020 at 00:26)</a>:</h4>
<p>Or ones with a length of 7.</p>
<p>I predict the biggest use case for unsafe code with our API is literally "so, now I want the machine vector back so I can optimize this thing with this one function on Intel" and in that case they'll be fine since they already know what they want, and mem::align_of seems sound as a starting point.</p>



<a name="213626994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213626994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> scottmcm <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213626994">(Oct 17 2020 at 00:32)</a>:</h4>
<p>Hmm, interesting.  That would mean it should be fully-aligned (up to 512 bits) on intel so that dynamic checks for big vector support could still use it.</p>



<a name="213629042"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213629042" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213629042">(Oct 17 2020 at 01:25)</a>:</h4>
<p>So my desire for the larger alignment is that, i think that an ideal is for the size and alignment to be the same on all platforms. Some platforms have 32-bit integers as align2, but we still don't offer variable alignment int32 in rust. I view this as similar</p>



<a name="213629051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257879-project-portable-simd/topic/does%20i32x4%20have%20a%20consistent%20repr%3F/near/213629051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lokathor <a href="https://rust-lang.github.io/zulip_archive/stream/257879-project-portable-simd/topic/does.20i32x4.20have.20a.20consistent.20repr.3F.html#213629051">(Oct 17 2020 at 01:25)</a>:</h4>
<p>that said, it's not strictly necessary, people can use align_of and so on if they must</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>